package logging;

import org.jbehave.scenario.annotations.Given;
import org.jbehave.scenario.annotations.Then;
import org.jbehave.scenario.annotations.When;
import org.jbehave.scenario.steps.CandidateSteps;
import org.jbehave.scenario.steps.Steps;
import static org.jbehave.Ensure.ensureThat;
public class LoginSteps extends Steps implements CandidateSteps {
	String name;
	String pw;
	String estado="in";
	@Given("I am not logged in")
    public void logOut() {
		estado="out";
        //currentPage.click("logout");
    }
 
    @When("I log in as $username with a password $password")
    public void logIn(String username, String password) {
    	ensureThat(estado.equals("out"));
    	name=username;
    	pw=password;
    	estado="in";
        //currentPage.click("login");
    }
 
    @Then("I should see a message, \"$message\"")
    public void checkMessage(String message) {
    	ensureThat(estado.equals("in"));

    	//ensureThat(currentPage, containsMessage(message));
    }
}
